home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Found / BCCollec / Support / BCStoreM.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  758 b   |  37 lines  |  [TEXT/MPS ]

  1. //  The C++ Booch Components (Version 2.1)
  2. //  (C) Copyright 1990-1993 Grady Booch. All Rights Reserved.
  3. //
  4. //  BCStoreM.h
  5. //
  6. //  This file contains the declaration of the managed storage
  7. //  management class utility.
  8.  
  9. #ifndef BCSTOREM_H
  10. #define BCSTOREM_H 1
  11.  
  12. #include "BCPool.h"
  13.  
  14. // Class utility providing a managed memory allocation/deallocation protocol
  15.  
  16. class BC_CManaged {
  17. public:
  18.  
  19.   static BC_CPool& fPool;
  20.  
  21.   static void* Allocate(size_t s) 
  22.     {return fPool.Allocate(s);}
  23.   static void Deallocate(void* p, size_t s) 
  24.     {fPool.Deallocate(p, s);}
  25.  
  26. private:
  27.  
  28.   BC_CManaged() {}
  29.   BC_CManaged(const BC_CManaged&) {}
  30.   void operator=(const BC_CManaged&) {}
  31.   void operator==(const BC_CManaged&) {}
  32.   void operator!=(const BC_CManaged&) {}
  33.  
  34. };
  35.  
  36. #endif
  37.